
package cn.nubia.admin.application.bean;

import cn.nubia.admin.common.mybatis.annotations.Column;
import cn.nubia.admin.common.mybatis.annotations.Id;
import cn.nubia.admin.common.mybatis.annotations.Table;

import java.io.Serializable;
import java.util.Map;
import java.util.TreeMap;

/**
 * Created by justin on 15/6/30.
 * CREATE TABLE `nb_claim` (
 `claim_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '举报id',
 `claim_type` int(11) DEFAULT NULL COMMENT '枚举类型',
 `content` varchar(300) DEFAULT NULL COMMENT '举报内容',
 `create_time` int(11) DEFAULT NULL COMMENT '举报时间',
 `state` smallint(6) DEFAULT NULL COMMENT '举报状态(-1删除 0-隐藏 1-已阅)',
 `res_type` int(11) DEFAULT NULL COMMENT '资源类型（1-软件详情 2-软件分类 3-专>题）',
 `res_id` int(11) DEFAULT NULL COMMENT '资源类型',
 `last_modifty_time` int(11) DEFAULT NULL COMMENT '最后修改时间',
 `client_ip` varchar(20) DEFAULT NULL COMMENT '客户端地址',
 `uid` int(11) DEFAULT NULL COMMENT '用户编号',
 `user_name` varchar(20) DEFAULT NULL COMMENT '用户名称',
 PRIMARY KEY (`claim_id`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='举报信息';


 */
@Table(value = "nb_claim")
public class Claim implements Serializable{

    private static final long serialVersionUID = -8244661101951482489L;

    public static final int STATE_DEL = -1;
    public static final int STATE_READED = 1;
    public static final int STATE_HIDDEN = 0;


    public static final String COLUMN_STATE = "state";
    public static final String COLUMN_CLAIMTYPE = "claimType";
    public static final String COLUMN_RESTYPE = "resType";
    public static final String COLUMN_USERNAME = "userName";
    public static final String COLUMN_CREATETIME = "createTime";

    @Id(value = "claim_id")
    private Integer id;
    @Column(value = "claim_type")
    private Integer claimType;//枚举类型
    @Column(value = "content")
    private String content;//举报内容
    @Column(value = "create_time")
    private Integer createTime;
    @Column(value = "state")
    private Integer state;//举报状态(-1删除 0-隐藏 1-已阅)
    @Column(value = "res_type")
    private Integer resType;//资源类型（1-软件详情 2-软件分类 3-专>题）
    @Column(value = "res_id")
    private Integer resId;
    @Column(value = "last_modifty_time")
    private Integer lastModifyTime;
    @Column(value = "client_ip")
    private String clientIp;
    @Column(value = "uid")
    private Integer uid;
    @Column(value = "user_name")
    private String userName;

    public static Map<String,String> resTypeMap =new TreeMap<>();
    public static Map<String,String> stateMap =new TreeMap<>();
    static{
        resTypeMap.put("1","软件详情");
        resTypeMap.put("2","软件分类");
        resTypeMap.put("3","专题");
        stateMap.put("0","隐藏");
        stateMap.put("1","已阅");
    }


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getClaimType() {
        return claimType;
    }

    public void setClaimType(Integer claimType) {
        this.claimType = claimType;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Integer getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Integer createTime) {
        this.createTime = createTime;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Integer getResType() {
        return resType;
    }

    public void setResType(Integer resType) {
        this.resType = resType;
    }

    public Integer getResId() {
        return resId;
    }

    public void setResId(Integer resId) {
        this.resId = resId;
    }

    public Integer getLastModifyTime() {
        return lastModifyTime;
    }

    public void setLastModifyTime(Integer lastModifyTime) {
        this.lastModifyTime = lastModifyTime;
    }

    public String getClientIp() {
        return clientIp;
    }

    public void setClientIp(String clientIp) {
        this.clientIp = clientIp;
    }

    public Integer getUid() {
        return uid;
    }

    public void setUid(Integer uid) {
        this.uid = uid;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }
}
